<?php
class Core_Data_Secure {
	
	/**
	 * @var array $newData
	 */
	public $newData = array();
	
	
	public function stripSlashes(array $data){
		
		foreach($data as $key => $value){
			
			$this->newData = is_array($value) ? $this->stripSlashes($value) : stripslashes($value);
			
		}
		
		return $$this->newData;
	}
	
	/**
	 * @param array $data
	 * @return array $newData
	 */
	public function htmlEntities(array $data){
		
		foreach($data as $key => $value){

			$this->newData[htmlentities($key)] = htmlentities($value);
		
		}
		
		return $this->newData;
	}
	
	/**
	 * @param array $data
	 * @return array $newData
	 */
	public function htmlSpecialChars(array $data){
		
		foreach($data as $key => $value){
			
			$this->newData[htmlspecialchars($key)] = htmlspecialchars($value);
		
		}
		
		return $this->newData;
	}
	
}